<%@ Page language="c#" Inherits="Dimok.Aspx.Manager.Verification.References" CodeFile="References.aspx.cs" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>References</TITLE>
<META name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"><META name="CODE_LANGUAGE" Content="C#"><META name="vs_defaultClientScript" content="JavaScript"><META name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<LINK rel="stylesheet" type="text/css" href="/CSS/Outlook.css">
<SCRIPT language="javascript" src="/include/common.js"></SCRIPT>
<SCRIPT language="javascript" src="/include/RDS.js"></SCRIPT>
<SCRIPT language="javascript" src="/include/SOAP.js"></SCRIPT>
<SCRIPT language="javascript" src="/include/XML.js"></SCRIPT>
<STYLE>
INPUT {OVERFLOW-X:visible;width:100%}
</STYLE>
</HEAD>
<BODY onload="page_Load()">
<XML id="XmlInterviews" runat="server"></XML>
<XML id="XmlInterviewDoneBy" runat="server"></XML>
<XML id="XmlReferences" runat="server"></XML>
<XML id="XmlRelations" runat="server"></XML>
<TABLE dataSrc="#XmlInterviews">
	<THEAD>
		<TR><TD colspan="10">
			<TABLE width="100%"><TR><TD><HR></TD><TH width="1%" nowrap>Borrower Interview</TH><TD><HR></TD></TR></TABLE>
		</TD></TR>
		<TR><TH>Done By</TH><TH>Call</TH><TH>Date</TH><TH>By</TH><TH>Note</TH></TR>
	</THEAD>
	<TR>
		<TD>
			<INPUT datafld="DoneBy" onupdate="return UF()" style="BEHAVIOR: URL(/include/HTC/BigList.htc); OVERFLOW-X: visible;width:100%" xmlSrc="XmlInterviewDoneBy" valueField="Phone" textField="Phone" loose nofilter>
		</TD>
		<TD><SELECT datafld="Weight" id="selBorrInterviewWeight" runat="server" tabindex="-1" onchange="return UF()"></SELECT></TD>
		<TD><SPAN dataFld="Date_F" style="MARGIN-LEFT: 5px"></SPAN></TD>
		<TD><SPAN dataFld="UserName" style="MARGIN-LEFT: 5px"></SPAN></TD>
		<TD><TEXTAREA datafld="Note" style="FONT-SIZE: 100%; OVERFLOW: visible; WIDTH: 100%; FONT-FAMILY: Monospace; HEIGHT: 100%" onchange="return UF()"></TEXTAREA></TD>
	</TR>
	<TFOOT><TR><TD align="right">Score:</TD><TH id="tdScore"></TH><TD scoreMin="15">(15 minimum)</TD></TR></TFOOT>
</TABLE>
<TABLE dataSrc="#XmlReferences">
	<THEAD>
		<TR><TD colspan="10">
			<TABLE width="100%"><TR><TD><HR></TD><TH width="1%">References</TH><TD><HR></TD></TR></TABLE>
		</TD></TR>
		<TR><TH>Name</TH><TH>Phone</TH><TH>Relation</TH><TH>Call</TH><TH>Date</TH><TH>By</TH><TH>Note</TH></TR>
	</THEAD>
	<TR valign="top">
		<TD><INPUT dataFld="Name" style="MARGIN-LEFT: 5px" onchange="return UF()"></TD>
		<TD><INPUT dataFld="Phone" style="MARGIN-LEFT: 5px" onpropertychange="setMask(this,'phone')" onchange="return UF()"></TD>
		<TD>
			<INPUT datafld="Relation" onupdate="return UF()" style="BEHAVIOR: URL(/include/HTC/BigList.htc); OVERFLOW-X: visible;width:100%" xmlSrc="XmlRelations" valueField="Name" textField="Name" loose nofilter>
		</TD>
		<TD><SELECT datafld="InterviewWeight" id="selRefInterviewWeight" runat="server" tabindex="-1" onchange="return UF()"></SELECT></TD>
		<TD><SPAN dataFld="InterviewDate_F" style="MARGIN-LEFT: 5px"></SPAN></TD>
		<TD><SPAN dataFld="InterviewByWho" style="MARGIN-LEFT: 5px"></SPAN></TD>
		<TD><TEXTAREA datafld="Note" style="FONT-SIZE: 100%; OVERFLOW: visible; WIDTH: 100%; FONT-FAMILY: Monospace; HEIGHT: 100%" onchange="return UF()"></TEXTAREA></TD>
	</TR>
	<TFOOT><TR><TD colspan="2"></TD><TD align="right">Score:</TD><TH id="tdScore"></TH><TD scoreMin="30">(30 minimum)</TD></TR></TFOOT>
</TABLE>
</BODY>
</HTML>
<SCRIPT language="javascript">
initWS("COMMON","../Common/Common.asmx");
function page_Load(){
	attachToKeyDown();
	UF = UF_AddCallBacks(reloadRS);
	score(XmlReferences.recordset,"InterviewWeight",tdScore[1]);
	score(XmlInterviews.recordset,"Weight",tdScore[0]);
}
function reloadRS(ret,el,fieldName,fieldValue,wsMethod){
	var rs = eval(wsMethod).recordset;
	updateRS(rs,ret.value);
	if( fieldName.match(/weight$/i) )
		score(rs,fieldName,getParentTable(el).all.tdScore);
	refreshMask(getParentTable(el));
}
function score(rs,fieldName,scoreElement){
	rs.MoveFirst();
	for( var s=0 ; !rs.EOF; rs.MoveNext() )
		s += parseInt(rs(fieldName).value)||0;
	var scoreMin = parseInt(scoreElement.nextSibling.scoreMin);
	scoreElement.style.color = s >= scoreMin ? "DARKGREEN" : "CRIMSON";
	scoreElement.innerHTML = s+" points";
}
</SCRIPT>
